class Authorization < ActiveAdmin::AuthorizationAdapter

  def authorized?(action, subject = nil)
    case subject
    when normalized(News)
      abilities = user.abilities.find_by(name: 'news')
      return false unless abilities
      p [subject, abilities.access, action]
      abilities.access.include? action.to_s
    else
      true
    end
  end

end
